package com.peng.knif4.controller;

import com.peng.knif4.Pojo.User;
import com.peng.knif4.excel.ExcelUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;


@RestController
@RequestMapping("/third")
public class ThirdInterface {

    @Autowired
    RestTemplate restTemplate;



    @GetMapping("/ge")
    public void ge(HttpServletResponse response){
        ArrayList<User> users = new ArrayList<>();
        User user = new User();
        user.setName("111");
        users.add(user);
        ExcelUtils.export(response,"用户摆",users,User.class);
    }




}

